Well-typed generic smart-fuzzing for APIs
نویسندگان
چکیده
Despite recent advances in program certification, testing remains a widely-used component of the software development cycle. Various flavours of testing exist: popular ones include unit testing, which consists in manually crafting test cases for specific parts of the code base, as well as QuickCheck-style testing, where instances of a type are automatically generated to serve as test inputs. These methods of testing can be thought of as internal testing: the test routines need to access the internal representation of the datastructures that are used by the functions under test. They can also be thought of as per-function testing: a test suite is built (by hand, or automatically) for each function that must be tested. We propose a new method of external testing that applies at the level of the module interface. The core of our work is a small embedded domain specific language to describe APIs, i.e., functions and data-types. Then, these API descriptions are used to drive the generation of test-cases. We have successfully used this method in two different contexts: Test case generation. First, we implemented a library dubbed ArtiCheck that combines the functions exported by a given module interface to build elements of the various data-types exported by the module, and then checks that all the elements of these data-types meet user-defined invariants. Smart fuzzing. Second, the first author reimplemented this methodology while working at Cryptosense to automate the analysis of (security) APIs. More precisely, Cryptosense’s Testing library uses an API description to automatically exercise vendors’ implementations of the said API.
منابع مشابه
Fuzzing the Rust Typechecker Using CLP
Language fuzzing is a bug-finding technique for testing compilers and interpreters; its effectiveness depends upon the ability to automatically generate valid programs in the language under test. Despite the proven success of language fuzzing, there is a severe lack of tool support for fuzzing statically-typed languages with advanced type systems because existing fuzzing techniques cannot effec...
متن کاملA Smart Fuzzing Approach for Integer Overflow Detection
Fuzzing is one of the most commonly used methods to detect software vulnerabilities, a major cause of information security incidents. Although it has advantages of simple design and low error report, its efficiency is usually poor. In this paper we present a smart fuzzing approach for integer overflow detection and a tool, SwordFuzzer, which implements this approach. Unlike standard fuzzing tec...
متن کاملA Taint Based Smart Fuzzing Approach for Integer Overflow Vulnerability Detection
-Fuzzing is one of the most commonly used methods to detect software vulnerabilities which are one major cause of information security incidents. The basic idea of fuzzing is to discover software vulnerabilities by feeding unexpected input and monitoring abnormal behaviors. Although it has advantages of simple design and low error report, its efficiency is usually poor. In this paper we present...
متن کامل0-knowledge fuzzing
Nowadays fuzzing is a pretty common technique used both by attackers and software developers. Currently known techniques usually involve knowing the protocol/format that needs to be fuzzed and having a basic understanding of how the user input is processed inside the binary. In the past since fuzzing was little-used obtaining good results with a small amount of effort was possible. Today findin...
متن کاملEnumerating Well-Typed Terms Generically
We use generic programming techniques to generate well-typed lambda terms. We encode well-typed terms by generalized algebraic datatypes (GADTs) and existential types. The Spine approach (Hinze et al. 2006; Hinze and Löh 2006) to generic programming supports GADTs, but it does not support the definition of generic producers for existentials. We describe how to extend the Spine approach to suppo...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014